//
//  ExamineOneSuccessViewController.m
//  LoanOne
//
//  Created by WangZhenyu on 2017/10/27.
//  Copyright © 2017年 WangZhenyu. All rights reserved.
//

#import "ExamineOneSuccessViewController.h"
#import "GlobalFunction.h"

@interface ExamineOneSuccessViewController ()
@property (weak, nonatomic) IBOutlet UIButton *sureBtn;

@end

@implementation ExamineOneSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"提交结果";
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame=CGRectMake(0, 0, 40, 40);
    [btn setImage:[UIImage imageNamed:@"black_back_btn"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(surePress) forControlEvents:UIControlEventTouchUpInside];
    if (IOS11_OR_LATER) {
        btn.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
        [btn setImageEdgeInsets:UIEdgeInsetsMake(0, -5 *SCREEN_WIDTH_DEVICE /375.0,0,0)];
    }
    UIBarButtonItem *btn_left = [[UIBarButtonItem alloc] initWithCustomView:btn];
    UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc]
                                       initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
                                       target:nil action:nil];
    negativeSpacer.width = -15;
    self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:negativeSpacer, btn_left, nil];
    
    [self.sureBtn setBackgroundImage:getColorToImage(ThemeColor) forState:UIControlStateNormal];
    self.sureBtn.layer.masksToBounds = YES;
    self.sureBtn.layer.cornerRadius = 5.0f;
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)surePress {
    [self.navigationController popToRootViewControllerAnimated:YES];
}


@end
